<%@page import="com.portal4kids.model.Holidays"%>
<%@page import="com.portal4kids.model.ServicesSport"%>
<%@page import="java.util.List"%>
<%@page import="com.portal4kids.controller.ServicesManager"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Portal for kids</title>

	<link rel="stylesheet" href="css/themes/base/jquery.ui.all.css">
	<link rel="stylesheet" href="css/demos.css">
	<link rel="stylesheet" href="css/search_style.css">
	
	<script>
		$(function() {
			$( "input:submit, a, button", ".demo" ).button();
			$( "a", ".demo" ).click(function() { return false; });
		});
	</script>
	
	<style>
		body { font-size: 62.5%; }
		label { display:block; }
		fieldset { padding:0; border:0; margin-top:25px; }
		h1 { font-size: 1.2em; margin: .6em 0; }
		div#users-contain { width: 350px; margin: 20px 0; }
		div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
		div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
		.ui-dialog .ui-state-error { padding: .3em; }
		.validateTips { border: 1px solid transparent; padding: 0.3em; }
	</style>
</head>
<body background="images/bg_search.jpg">
<div id="top">
 <ul id=menu>
      <li><a href="index.jsp">home</a></li>
      <li><a href="baner/newses.jsp">aktualności</a></li>

      <li><a href=#>oceny</a></li>
      <li><a href="baner/aboutAs.jsp">o nas</a></li>
      <li><a href="baner/contact.jsp">kontakt</a></li>
    </ul>
</div>

<div id=bottom>

	 <h2 style="color:white; margin-top: 10px;">Wybierz typ obozu wakacyjnego:</h2>
	<form action="searchHolidays" method="post">
		<div class="demo">
		
			<input type="submit" value="Obozy tematyczne" name="holiday.type" style="width: 220px; height: 40px; margin-left: 10%;"/>
			<input type="submit" value="Wyjazdy językowe" name="holiday.type" style="width: 220px; height: 40px;"/>
			<input type="submit" value="Obozy muzyczne" name="holiday.type" style="width: 220px; height: 40px;"/>
			<input type="submit" value="Kempingi" name="holiday.type" style="width: 220px; height: 40px; margin-left: 10%;"/>
			<input type="submit" value="Agroturystyka" name="holiday.type" style="width: 220px; height: 40px;"/>
			<input type="submit" value="Rodzinne wyjazdy weekendowe" name="holiday.type" style="width: 220px; height: 40px;"/>
		
		</div><!-- End demo -->
	</form>	

	<% if(request.getAttribute("holidayList") != null){
		List<Holidays> holidays = (List<Holidays>)request.getAttribute("holidayList");
		if(!holidays.isEmpty()){
	%>
	<div id="users-contain" class="ui-widget">
			<h2 style="color: white;">Wyniki wyszukiwania</h2>
			<table id="users" class="ui-widget ui-widget-content">
			<thead>
				<tr class="ui-widget-header ">
					<th>Nazwa</th>
					<th>Ocena</th>
					<th>Liczba głosów</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="holidayList">
					<tr>
						<td><a href="holidaysDetails.jsp?id=<s:property value="id_holidays"/>"><s:property value="name"/></a></td>
						<td><s:property value="avarage"/></td>
						<td><s:property value="numberOfVotes"/></td>
					</tr>
				</s:iterator>
				
			</tbody>
	</table>
	</div>
	<%}else{%>
		<div class="ui-widget">
					<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"><br /><br />
						<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
						<strong>Brak wyników wyszukiwania.</strong> </p><br /><br />
					</div>
		</div>
		<%}} %>
</div>

</body>
</html>